package com.mzx.info.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mzx.entity.BaseDict;
import com.mzx.entity.Customer;
import com.mzx.entity.Info;
import com.mzx.mapper.InfoMapper;

@Service
public class InfoService {
	@Autowired
	private InfoMapper infoMapper;
	/*登陆成功加载信息下拉列表业务*/
public List<BaseDict> LoadInfo(String bcode){
return infoMapper.selectByBcode(bcode);

}

			/*加载维修信息业务*/
public Info getInfo(Customer customer) {
	System.out.println(customer);
	return infoMapper.selectInfoByCarcode(customer);
	
}
/*新建维修信息业务*/
public Boolean createInfo(Info info) {
return infoMapper.insertInfo(info);

}
			/*查询修改框定位到的值业务*/
public Info showInfo(String info_customer_carcode) {
	return infoMapper.selectInfoByInfoCustomerCarcode(info_customer_carcode);
	
}
			/*修改维修业务*/
public Boolean changeInfo(Info info) {
	return infoMapper.updateInfo(info);
	
	
}

			/*维修信息删除模块*/
public Boolean deleteInfo(String info_customer_carcode) {
	return  infoMapper.deleteInfoByCarcode(info_customer_carcode);
	
}
}
